The invention relates generally to computer operating systems, and deals more particularly with a distributed computer operating system to protect and recover distributed but functionally related resources including conversations.
This patent application is related to U.S. patent applications:
U.S. patent application Ser. No. 07/525,427, entitled "COORDINATED SYNC POINT MANAGEMENT OF PROTECTED RESOURCES" filed May 16, 1990 by M. K. Ainsworth et al., now U.S. Pat. No. 5,327,532;
U.S. patent application Ser. No. 07/526,471, entitled "OPTIMIZATION OF COMMIT PROCEDURES" filed May 16, 1990 by A. Coleman et al., now U.S. Pat. No. 5,261,089;
U.S. patent application Ser. No. 07/525,938, entitled "RECOVERY FACILITY FOR INCOMPLETE SYNC POINTS FOR DISTRIBUTED APPLICATION" filed May 16, 1990 by M. K. Ainsworth et al., now U.S. Pat. No. 5,319,774;
U.S. patent application Ser. No. 07/525,429, entitled "ASYNCHRONOUS RESYNCHRONIZATION OF A COMMIT PROCEDURE" filed May 16, 1990 by K. H. Britton et al., now U.S. Pat. No. 5,319,773;
U.S. patent application Ser. No. 07/525,939, entitled "REGISTRATION OF RESOURCES FOR COMMIT PROCEDURES" filed May 16, 1990 by A. Coleman, now U.S. Pat. No. 5,276,876; and
U.S. patent application Ser. No. 07/526,472, entitled "COORDINATED HANDLING OF ERROR CODES AND INFORMATION DESCRIBING ERRORS IN A COMMIT PROCEDURE" filed May 16, 1990 by E. A. Pruul et al., now U.S. Pat. No. 5,165,031.
The operating system of the present invention can be used in a network of computer systems. Each such computer system can comprise a central, host computer and-a multiplicity of virtual machines or other types of execution environments. The host computer for the virtual machines includes a system control program to schedule access by each virtual machine to a data processor of the host, and help to manage the resources of the host, including a large memory, such that each virtual machine appears to be a separate computer. Each virtual machine can also converse with the other virtual machines to send messages or files via the hosts. Each virtual machine has its own CMS portion of the system control program to interact with (i.e., receive instructions from and provide prompts for) the user of the virtual machine. There may be resources such as shared file system (SFS) and shared SQL relational databases which are accessible by any user virtual machine and the host.
Each such system is considered to be one real machine. It is common to interconnect two or more such real machines in a network, and transfer data via conversations between virtual machines of different real machines. Such a transfer is made via communication facilities such as AVS Gateway and VTAM facilities ("AVS Gateway" and "VTAM" are trademarks of IBM Corp. of Armonk, N.Y.).
An application can change a database or file resource by first making a work request defining the changes. In response, provisional changes according to the work request are made in shadow files while the original database or file is unchanged. At this time, the shadow files are not valid. Then, the application can request that the changes be committed to validate the shadow file changes, and thereby, substitute the shadow file changes for the original file. A one-phase commit procedure can be utilized. The one-phase commit procedure consists of a command to commit the change of the resource as contained in the shadow file. When resources such as SFS or SQL resources are changed, the commits to the resources can be completed in separate one-phase commit procedures. In the vast majority of cases, all resources will be committed in the separate procedures without error or interruption. However, if a problem arises during any one-phase commit procedure some of the separate commits may have completed while others have not, causing inconsistencies. The cost of rebuilding non-critical resources after the problem may be tolerable in view of the efficiency of the one-phase commit procedure.
However, a two-phase commit procedure is required to protect critical resources and critical conversations. For example, assume a first person's checking account is represented in a first database and a second person's savings account is represented in a second database. If the first person writes a check to the second person and the second person deposits the check in his/her savings account, the two-phase commit procedure ensures that if the first person's checking account is debited then the second person's savings account is credited or else neither account is changed. The checking and savings accounts are considered protected, critical resources because it is very important that data transfers involving the checking and savings accounts be handled reliably. An application program can initiate the two-phase commit procedure with a single command, which procedure consists of the following steps, or phases:
(1) During a prepare phase, each participant (debit and credit) resource is polled by the sync point manager to determine if the resource is ready to commit all changes. Each resource promises to complete the resource update if all resources successfully complete the prepare phase i.e. are ready to be updated. PA1 (2) During a commit phase, the sync point manager directs all resources to finalize the updates or back them out if any resource could not complete the prepare phase successfully.
An IBM System Network Architecture SNA LU6.2 architecture reference SC31-6808 chapter 5.3 "Presentation Services--Sync Point Verbs", published by IBM Corp. was previously known to coordinate commits between two or more protected resources. This architecture previously addressed sync point facilities consisting of a sync point manager which performed both sync point and associated recovery processing running in a single application environment. Several applications could run simultaneously in this environment. The LU6.2 architecture supports a sync point manager (SPM) which is responsible for resource coordination, sync point logging and recovery. The prior art CICS/VS (trademark of IBM Corp. of Armonk, N.Y.) environment supports such an architecture. According to the SNA LU6.2 architecture prior art, in phase one and phase two, commit procedures are executed and the sync point manager logs the phase in the sync point log. Also, the sync point manager logs an identification number of a logical unit of work which is currently being processed. Such logging assists the sync point manager in resource recovery or resynchronization in the event that a problem arises during the two-phase commit procedure. If such a problem arises subsequent to entering the two-phase commit procedure, the log is read and resource recovery processing takes place to bring the resources involved in the commit procedure to a consistent state. The problems include failure of a communication path or failure in a resource manager.
The aforesaid LU6.2 sync point architecture is defined as one application execution environment. Every LU6.2 sync point environment runs applications for that environment. Data is typically owned by that environment and not shared outside of the environment, unless it is specifically extracted from the environment. The LU6.2 sync point architecture defines a sync point manager (SPM) model for resource coordination, recovery and sync point manager logging in a single environment. Similarly, in another prior art system control program, CICS/VS systems, sold by IBM Corp., all processes and most resources are owned by the execution environment rather than by the system.
In another prior art system control program, VM/SP Release 5 program, sold by IBM Corp. for supporting multiple (virtual machine) execution environments, two application programs could run in the same (virtual machine) execution environment. However, if the called application program committed file updates, this would cause the calling application program's file updates to be committed even if the files of the calling application program were not yet in a consistent state. There was no feature in this prior art system control program to separate the work of the calling application program from the work of the called application program. In addition, commits were limited to files and, through separate procedures, databases.
In a subsequent prior art system control program, VM/SP Release 6 program, also sold by the IBM Corp. for a virtual machine environment, two application programs running on the same virtual machine (execution environment) could define different work units for their files. As a result, the files accessed by one application could be committed independently of the files accessed by the other application, and the work of one application could be done independently of the work of the other application. Also, in this subsequent prior art system control program, one application (for example, a server) could have multiple work units concurrently. Nevertheless, the subsequent prior art system control program was limited in that although multiple resources could have the same work unit, the resource updates had to be committed independently. Furthermore, each work unit was confined to an execution environment (virtual machine).
In the CICS/VS prior art referenced above, a failure of an application or its partner or the connecting conversation and communications facilities, requires a predefined, unilateral decision for resolving sync points that are in the second stage of the two-phase commit, i.e. where a commit decision had been given to the sync point participants, but confirmation of the commit had not been received from all participants. Such a state is referred to as an in-doubt sync point state. In such cases, a unilateral recovery decision could result in damage to participating resources where the resources were changed inconsistently(one participating resource committed while another was backed out). For example, assume a sync point were in an in-doubt state when a failure occurred, such that a first participating resource manager had received the commit request from the sync point manager and processed the commit of its resource, and a second resource manager, participating in the same sync point, had not processed the commit. Assume also that the second resource manager, in the interest of clearing the in-doubt state so that normal resource processing could continue, decided to unilaterally back out the prepared sync point, thereby undoing any changes to the second resource. There results an inconsistency between the first and second resource relative to the intent of the using application(s). Such actions on the part of the second resource manager are not uncommon because resources are frequently locked during the sync point to prevent other users of the resource from accessing the resource until it is consistently changed and committed or backed out.
According to the CICS/VS prior art, there is one recovery facility associated with each sync point manager and it resides in the same execution environment as the sync point manager and the protected application; thus potentially there are multiple recovery facilities for a system that supports multiple execution environments. Likewise, each sync point manager requires a separate sync point log for supporting recovery from sync point failures. Thus for each execution environment in systems that support applications participating in coordinated recovery (sync point), there is a sync point manager that includes a recovery facility and a sync point recovery log.
Also, according to the CICS/VS prior art, log names are exchanged twice between sync point managers in separate execution environments that participate in a sync point procedure and communicate via conversations. The first exchange establishes a base for synchronizing the logs of participating sync point managers prior to beginning a sync point. The second exchange permits the recovery facility to verify, prior to beginning recovery from failed sync points, that the participating sync point managers have the same synchronized logs, insuring against a participant having had a log failure since first or initial log name exchange. There are separate logs for each execution environment, and log names are exchanged for every protected conversation, even conversations within one real machine.
Accordingly, a general object of the current invention is to provide an efficient system and process for exchanging log names for protected conversations and other resources i.e. to minimize the number of log name exchanges while insuring that all log failures are identified prior to beginning a recovery from a failed sync point procedure.
A more specific object of the present invention is to provide a system and process of the foregoing type which avoids log name exchanges for intrasystem conversations.
Another general object of the current invention is to provide a log name exchange system and process for resource managers that participate in sync point. This system and process should minimize the number of log name exchanges while insuring that all log failures are identified prior to beginning a recovery from a failed sync point procedure.